package com.lonwin.inspectionmanagement.mvp.model.api.service;

import com.lonwin.inspectionmanagement.mvp.model.entity.bean.CreaQuestResultBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.CruiseLocusBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.DelLocusBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.HhkqLhAliasBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.HistoryRecordingBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.NLocusSResult;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.NeatentLocusBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.NoSortOutBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.OpenLocusBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.PatrolBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.PointHistoryBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.QueryNumBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.QuestListBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.SaveResultBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.SearLocusBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.SortOutBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.UpcommingBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.UserBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.XcjlbInfoBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface BusinessService {
    /**
     * http://api.test.lonhcloud.cn/swagger-ui.html#!/api----%E4%B8%9A%E5%8A%A1%E6%8E%A5%E5%8F%A3---%E6%B2%B3%E9%95%BF%E5%88%B6%E5%AE%9A%E5%88%B6%E6%8E%A5%E5%8F%A3/getHhkqLhAliasListByGpsIDUsingGET
     * 查询河湖【河湖库渠】status 状态为1，查询指定行政区划下全部河湖库渠【优先自定树、没有查询到则查询河湖库渠管理树】；为0时，以网络账号gpsid和对应的角色ID（roleid）来过滤对应河湖库渠。
     * projectid 项目ID
     *  adcd 行政区划编码 15位
     *  status 查询数据状态，1表示查询指定政区下全部，0表示查询指定账户关联
     *  gpsid gpsID（状态status为1可以不传）
     *  roleid 角色ID（状态status为1可以不传）
     * @return
     */
//    @GET("/api/v1/business/hzz/getHhkqLhAliasListByGpsID")
    @GET
    Observable<HhkqLhAliasBean> queryHhkqLhAlias(@Url String url,@QueryMap Map<String,String> params);

    /**
     * 上传数据
     * @param url
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST
    Observable<String> updateData(@Url String url,@FieldMap Map<String,String> params);

    /**
     * 开始巡河
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<PatrolBean> startPatrol(@Url String url, @QueryMap Map<String,String> params);
    @GET
    Observable<PatrolBean> endPatrol(@Url String url, @QueryMap Map<String,String> params);




    /**
     * 获取历史数据
     * @param url
     *  gpsid
     *  sysId
     *  beginDate
     *  endDate
     *  pageNum
     *  pageSize
     * @return
     * @Query("1") String gpsid,@Query("2") String sysId,@Query("3") String beginDate,@Query("4") String endDate,@Query("5") int pageNum,@Query("6") int pageSize
     */
    @GET
    Observable<HistoryRecordingBean> queryHistory(@Url String url,@QueryMap Map<String,String> params);

    /**
     * 查询巡河记录列表
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<CruiseLocusBean> queryCruiseHistory(@Url String url, @QueryMap Map<String,String> params);

    /**
     * 查询打点记录
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<PointHistoryBean> queryPointHistory(@Url String url, @QueryMap Map<String,String> params);

    /**
     * 获取巡河轨迹记录参数
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<PatrolBean> getXcpath(@Url String url, @QueryMap Map<String,String> params);

    /**
     * 保存数据
     * @param url
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST
    Observable<SaveResultBean> savePoint(@Url String url, @FieldMap Map<String,String> params);

    @FormUrlEncoded
    @POST
    Observable<PointHistoryBean.DataBean> editPoint(@Url String url, @FieldMap Map<String,String> params);

    @Multipart
    @POST
    @Streaming
    Observable<String> uploadFile(@Url String url, @Part MultipartBody.Part file);

    /**
     * 保存数据,开始、暂停、结束
     * @param url
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST
    Observable<NLocusSResult> cpathTemp(@Url String url, @FieldMap Map<String,Object> params);

    /**
     * 暂停后继续记录问题
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<NLocusSResult> continueXcpathTemp(@Url String url, @QueryMap Map<String,Object> params);

    /**
     * 查询未整理的巡查记录
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<NoSortOutBean> getUndigestedXcjl(@Url String url, @QueryMap Map<String,Object> params);


    /**
     * 添加问题记录
     * @param url
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST
    Observable<CreaQuestResultBean> addQuestTemp(@Url String url, @FieldMap Map<String,Object> params);


    @GET
    Observable<String>  getMethodData(@Url String url,@QueryMap Map<String,String> params);

    @FormUrlEncoded
    @POST
    Observable<String> postMethodData(@Url String url, @FieldMap Map<String,String> params);


    /**
     *
     查询已整理的巡查记录(第一页)
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<SortOutBean>  getDigestedXcjlIndex(@Url String url, @QueryMap Map<String,Object> params);

    /**
     * 查询轨迹
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<SearLocusBean>  getXcpathTemp(@Url String url, @QueryMap Map<String,Object> params);

    /**
     * 整理轨迹
     * @param url
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST
    Observable<NeatentLocusBean> neatenXcpathTemp(@Url String url, @FieldMap Map<String,String> params);


    /**
     * 公开轨迹
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<OpenLocusBean>  openXcpathTemp(@Url String url, @QueryMap Map<String,Object> params);
    /**
     * 删除轨迹
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<DelLocusBean>  deleteXcpathTemp(@Url String url, @QueryMap Map<String,Object> params);

    /**
     * 查询这个轨迹上的问题列表
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<QuestListBean>  getGcglQuestTemp(@Url String url, @QueryMap Map<String,Object> params);

//    /questTempController/getGcglQuestTemp

    /**
     * 查询最后一个轨迹
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<NLocusSResult>  getMyLastXcpath(@Url String url, @QueryMap Map<String,Object> params);


    /**
     * 查询联络员和河长代办数量
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<QueryNumBean>  getHzUnCheckXcjlbCount(@Url String url, @QueryMap Map<String,Object> params);


    /**
     * 查询联络员和河长代办查询待办记录表
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<UpcommingBean>  getBacklogXcjlb(@Url String url, @QueryMap Map<String,Object> params);

    /**
     * 查询记录表详情
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<XcjlbInfoBean>  getXcjlbById(@Url String url, @QueryMap Map<String,Object> params);

    /**
     * 编辑巡查记录表
     * @param url
     * @param params
     * @return
     */
      @FormUrlEncoded
    @POST
    Observable<XcjlbInfoBean> editXcjlb(@Url String url, @FieldMap Map<String,String> params);

    /**
     * 巡查记录表报送发签批，归档记录表共用
     * @param url
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST
       Observable<XcjlbInfoBean> submittedXcjlb(@Url String url, @FieldMap Map<String,String> params);

    /**
     * 获取选择交办人员列表
     * @param url
     * @param params
     * @return
     */
    @GET
    Observable<UserBean>  getSelectPerson(@Url String url, @QueryMap Map<String,Object> params);



}
